package com.jk.service;


import com.jk.OrderBean;
import com.jk.UserBean;
import com.jk.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

@FeignClient(value = "provider-userinfo")
public interface CxhUserServer {

    @GetMapping("user/sendCode")
    String sendCode(@RequestParam String phone, @RequestParam String typ);

    @GetMapping("user/quickLogin")
    HashMap<String, Object> quickLogin(@RequestParam String phone, @RequestParam String code, @RequestParam String typ);

    @GetMapping("user/login")
    HashMap<String, Object> login(@RequestParam String userName, @RequestParam String userPwd);

    @PostMapping("user/upPwd")
    String upPwd(@RequestParam String phone, @RequestParam String userPwd);

    @PostMapping("user/addUser")
    String addUser(@SpringQueryMap UserBean user, @RequestParam String code, @RequestParam String typ);

    @GetMapping("user/queryOrder")
    List<OrderBean> queryOrder(@RequestParam String phone, @RequestParam Integer page, @RequestParam Integer rows);

    @PostMapping("user/updateUserInfo")
    String updateUserInfo(@SpringQueryMap UserInfo user);

    @GetMapping("user/queryUserInfo")
    UserInfo queryUserInfo(@RequestParam Integer userId);

    @RequestMapping("page/logout")
    void logout();

    @PostMapping("user/delOrder")
    void delOrder(@RequestParam String orderId, @RequestParam String phone);

    @RequestMapping("page/queeryOrder")
    OrderBean queeryOrder(@RequestParam String orderId,@RequestParam  String state,@RequestParam  String phone);

    @RequestMapping("page/queryDetails")
    OrderBean queryDetails(@RequestParam String orderId);
}
